package com.userrequestdtos;

import java.util.Hashtable;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class UserRegistrationDTO implements KvmSerializable {

	// declaring variables

	public String v_useremail;
	public String v_userpassword;
	public String v_fname;
	public String v_lname;
	public String v_mobileno;

	// default constructor

	public UserRegistrationDTO() {
		// complusory
	}

	@Override
	public Object getProperty(int index) {
		// TODO Auto-generated method stub
		switch(index)
		{
		case 0:
			return v_useremail;
		case 1:
			return v_userpassword;
		case 2:
			return v_fname;
		case 3:
			return v_lname;
		case 4: 
			return v_mobileno;

		}
		return null;
	}

	@Override
	public int getPropertyCount() {
		// TODO Auto-generated method stub
		return 5;
	}

	@Override
	public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) {
		// TODO Auto-generated method stub
		switch(index)
		{
		case 0:info.type=PropertyInfo.STRING_CLASS;
		       info.name="v_useremail";
		                break;
		case 1:info.type=PropertyInfo.STRING_CLASS;
		       info.name="v_userpassword";
		                  break;
		case 2: info.type=PropertyInfo.STRING_CLASS;
		        info.name="v_fname";
		                  break;
		case 3: info.type=PropertyInfo.STRING_CLASS;
		        info.name="v_lname";
		                  break;
		case 4: info.type=PropertyInfo.STRING_CLASS;
                info.name="v_mobileno";
                break;
        default:
        	     break;
		}
	}

	@Override
	public void setProperty(int index, Object value) {
		// TODO Auto-generated method stub
		switch(index)
		{
		case 0:
			  v_useremail=value.toString();
			  break;
		case 1:
			  v_userpassword=value.toString();
			  break;
		case 2:
			  v_fname=value.toString();
			  break;
		case 3:
			v_lname=value.toString();
			  break;
		case 4:
			v_mobileno=value.toString();
			break;
		default:
				break;
		}

	}


}
